import java.util.ArrayList;

public class ActionServices {

	private ArrayList<Action> _actions;

	public ActionServices() {
		set_actions(GetActions());
	}

	public void set_actions(ArrayList<Action> _actions) {
		this._actions = _actions;
	}

	public ArrayList<Action> get_actions() {
		return _actions;
	}

	private ArrayList<Action> GetActions() {
		ArrayList<Action> actions = new ArrayList<Action>();
		actions.add(new Action(0, "Do Nothing", "// do nothing"));
		actions.add(new Action(1, "Do Strategy0", "// STRATEGY = 0 /n break /n"));
		actions.add(new Action(2, "Do Strategy1", "// STRATEGY = 1 /n break /n"));
		actions.add(new Action(3, "Do Tactic0", "// TACTIC = 0 /n break /n"));
		actions.add(new Action(4, "Do Tactic1", "// TACTIC = 1 /n break /n"));
		actions.add(new Action(5, "Do Tactic2", "// TACTIC = 2 /n break /n"));
		actions.add(new Action(6, "FIRE 1 bullets", "for(dist=1.0; dist<=1; dist++) {\n\tif(getBulletLoad() > 0) {\n\t\taim(item)\n\t\tif(item != FRIEND_WARRIOR) {\n\t\t\twhile(!shootBullet()) wait(0.05)\n\t\t}\n\t}\n}"));
		actions.add(new Action(7, "FIRE 2 bullets", "for(dist=2.0; dist<=1; dist++) {\n\tif(getBulletLoad() > 0) {\n\t\taim(item)\n\t\tif(item != FRIEND_WARRIOR) {\n\t\t\twhile(!shootBullet()) wait(0.05)\n\t\t}\n\t}\n}"));
		actions.add(new Action(8, "FIRE 3 bullets", "for(dist=3.0; dist<=1; dist++) {\n\tif(getBulletLoad() > 0) {\n\t\taim(item)\n\t\tif(item != FRIEND_WARRIOR) {\n\t\t\twhile(!shootBullet()) wait(0.05)\n\t\t}\n\t}\n}"));
		actions.add(new Action(9, "FIRE 4 bullets", "for(dist=4.0; dist<=1; dist++) {\n\tif(getBulletLoad() > 0) {\n\t\taim(item)\n\t\tif(item != FRIEND_WARRIOR) {\n\t\t\twhile(!shootBullet()) wait(0.05)\n\t\t}\n\t}\n}"));
		actions.add(new Action(10, "FIRE 5 bullets", "for(dist=5.0; dist<=1; dist++) {\n\tif(getBulletLoad() > 0) {\n\t\taim(item)\n\t\tif(item != FRIEND_WARRIOR) {\n\t\t\twhile(!shootBullet()) wait(0.05)\n\t\t}\n\t}\n}"));
		actions.add(new Action(11, "FIRE 6 bullets", "for(dist=6.0; dist<=1; dist++) {\n\tif(getBulletLoad() > 0) {\n\t\taim(item)\n\t\tif(item != FRIEND_WARRIOR) {\n\t\t\twhile(!shootBullet()) wait(0.05)\n\t\t}\n\t}\n}"));
		actions.add(new Action(12, "FIRE 7 bullets", "for(dist=7.0; dist<=1; dist++) {\n\tif(getBulletLoad() > 0) {\n\t\taim(item)\n\t\tif(item != FRIEND_WARRIOR) {\n\t\t\twhile(!shootBullet()) wait(0.05)\n\t\t}\n\t}\n}"));
		actions.add(new Action(13, "FIRE 8 bullets", "for(dist=8.0; dist<=1; dist++) {\n\tif(getBulletLoad() > 0) {\n\t\taim(item)\n\t\tif(item != FRIEND_WARRIOR) {\n\t\t\twhile(!shootBullet()) wait(0.05)\n\t\t}\n\t}\n}"));
		actions.add(new Action(14, "FIRE 9 bullets", "for(dist=9.0; dist<=1; dist++) {\n\tif(getBulletLoad() > 0) {\n\t\taim(item)\n\t\tif(item != FRIEND_WARRIOR) {\n\t\t\twhile(!shootBullet()) wait(0.05)\n\t\t}\n\t}\n}"));
		actions.add(new Action(15, "FIRE 10 bullets", "for(dist=10.0; dist<=1; dist++) {\n\tif(getBulletLoad() > 0) {\n\t\taim(item)\n\t\tif(item != FRIEND_WARRIOR) {\n\t\t\twhile(!shootBullet()) wait(0.05)\n\t\t}\n\t}\n}"));
		actions.add(new Action(16, "FIRE all", "if(getGrenadeLoad() > 0 && dist > 30.0 && dist <= 60.0) {\n\tbendTorso(pitch)\n\twhile(isTorsoBending()) wait(0.05)\n\twhile(!launchGrenade()) wait(0.05)\n\tbendTorso(0.0)\n} else {\n\tif(getBulletLoad() > 0) {\n\t\taim(item)\n\t\tif(item != FRIEND_WARRIOR) {\n\t\t\twhile(!shootBullet()) wait(0.05)\n\t\t\twhile(!shootBullet()) wait(0.05)\n\t\t}\n\t}\n}"));
		actions.add(new Action(17, "FIRE bullet", "if(getBulletLoad() > 0) {\n\taim(item)\n\tif(item != FRIEND_WARRIOR) {\n\t\twhile(!shootBullet()) wait(0.05)\n\t}\n}\n"));
		actions.add(new Action(18, "FIRE grenade", "if(getGrenadeLoad() > 0) {\n\twhile(!launchGrenade()) wait(0.05)\n}\n"));
		actions.add(new Action(19, "MOVE fast TO front", "if(! isRunning()) {\n\tif(isWalkingbk()) {\n\t\tstand()\n\t\twait(0.5)\n\t}\n\tif(isStanding()) {\n\t\twalk()\n\t\twait(0.5)\n\t}\n\trun()\n\twait(0.5)\n}\n"));
		actions.add(new Action(20, "MOVE slow TO back", "if(! isWalkingbk() ) {\n\tif(! isStanding() ) {\n\t\tstand()\n\t\twait(1.0)\n\t}\n\twalkbk()\n\twait(1.0)\n}\n"));
		actions.add(new Action(21, "SCAN enemy", "item = ENEMY_WARRIOR\ndist = 0.0\nwatch(item,dist,yaw,pitch)\nif(item == ENEMY_WARRIOR) {\n\tbendTorso(pitch)\n\tbendHead(-pitch)\n\tscanned = 1\n} else {\n\titem = ENEMY_GUN\n\tdist = hear(item,sound,yaw)\n\tif(item == ENEMY_GUN) {\n\t\tscanned = 1\n\t} else {\n\t\tscanned = 0\n\t}\n}\n"));
		actions.add(new Action(22, "SCAN friend", "item = FRIEND_WARRIOR\ndist = 0.0\nwatch(item,dist,yaw,pitch)\nif(item == FRIEND_WARRIOR) {\n\tbendTorso(pitch)\n\tbendHead(-pitch)\n\tscanned = 1\n} else {\n\titem = FRIEND_GUN\n\tdist = hear(item,sound,yaw)\n\tif(item == FRIEND_GUN) {\n\t\tscanned = 1\n\t} else {\n\t\tscanned = 0\n\t}\n}\n"));
		actions.add(new Action(23, "SCAN ITEM armor", "item = ITEM_ARMOR\ndist = 0.0\nwatch(item,dist,yaw,pitch)\nif(item == ITEM_ARMOR) {\n\tbendTorso(pitch)\n\tbendHead(-pitch)\n\tscanned = 1\n} else {\n\tscanned = 0\n}\n"));
		actions.add(new Action(24, "SCAN ITEM bullet", "item = ITEM_BULLET\ndist = 0.0\nwatch(item,dist,yaw,pitch)\nif(item == ITEM_BULLET) {\n\tbendTorso(pitch)\n\tbendHead(-pitch)\n\tscanned = 1\n} else {\n\tscanned = 0\n}\n"));
		actions.add(new Action(25, "SCAN ITEM food", "item = ITEM_FOOD\ndist = 0.0\nwatch(item,dist,yaw,pitch)\nif(item == ITEM_FOOD) {\n\tbendTorso(pitch)\n\tbendHead(-pitch)\n\tscanned = 1\n} else {\n\tscanned = 0\n}\n"));
		actions.add(new Action(26, "SCAN ITEM grenade", "item = ITEM_GRENADE\ndist = 0.0\nwatch(item,dist,yaw,pitch)\nif(item == ITEM_GRENADE) {\n\tbendTorso(pitch)\n\tbendHead(-pitch)\n\tscanned = 1\n} else {\n\tscanned = 0\n}\n"));
		actions.add(new Action(27, "SCAN ITEM gun", "item = ITEM_GUN\ndist = 0.0\nwatch(item,dist,yaw,pitch)\nif(item == ITEM_GUN) {\n\tbendTorso(pitch)\n\tbendHead(-pitch)\n\tscanned = 1\n} else {\n\tscanned = 0\n}\n"));
		actions.add(new Action(28, "SCAN ITEM medikit", "item = ITEM_MEDIKIT\ndist = 0.0\nwatch(item,dist,yaw,pitch)\nif(item == ITEM_MEDIKIT) {\n\tbendTorso(pitch)\n\tbendHead(-pitch)\n\tscanned = 1\n} else {\n\tscanned = 0\n}\n"));
		actions.add(new Action(29, "SCAN ITEM sign", "item = ITEM_SIGN\ndist = 0.0\nwatch(item,dist,yaw,pitch)\nif(item == ITEM_SIGN) {\n\tbendTorso(pitch)\n\tbendHead(-pitch)\n\tscanned = 1\n} else {\n\tscanned = 0\n}\n"));
		actions.add(new Action(30, "SCAN square center", "dist = getLocationYaw(0, 0, yaw)\nscanned = 1\n"));
		actions.add(new Action(31, "SCAN square east", "dist = getLocationYaw(ARENA_SIDED, 0, yaw)\nscanned = 1\n"));
		actions.add(new Action(32, "SCAN square north", "dist = getLocationYaw(0, ARENA_SIDED, yaw)\nscanned = 1\n"));
		actions.add(new Action(33, "SCAN square northeast", "dist = getLocationYaw(ARENA_SIDED, ARENA_SIDED, yaw)\nscanned = 1\n"));
		actions.add(new Action(34, "SCAN square northwest", "dist = getLocationYaw(-ARENA_SIDED, ARENA_SIDED, yaw)\nscanned = 1\n"));
		actions.add(new Action(35, "SCAN square south", "dist = getLocationYaw(0, -ARENA_SIDED, yaw)\nscanned = 1\n"));
		actions.add(new Action(36, "SCAN square southeast", "dist = getLocationYaw(ARENA_SIDED, -ARENA_SIDED, yaw)\nscanned = 1\n"));
		actions.add(new Action(37, "SCAN square southwest", "dist = getLocationYaw(-ARENA_SIDED, -ARENA_SIDED, yaw)\nscanned = 1\n"));
		actions.add(new Action(38, "SCAN square west", "dist = getLocationYaw(-ARENA_SIDED, 0, yaw)\nscanned = 1\n"));
		actions.add(new Action(39, "SCAN track", "getLocation(x, y)\nif(x <= 0.0 && y < 0.0) {\t\t//--- sw\n\tif(y > -ARENA_SIDEQ) dist = getLocationYaw(-ARENA_SIDEQ,-ARENA_SIDED,yaw)\n\telse dist = getLocationYaw(ARENA_SIDED,-ARENA_SIDEQ-20.0,yaw)\n\n} else if(x < 0.0 && y >= 0.0) { \t//--- nw\n\tif(x > -ARENA_SIDEQ) dist = getLocationYaw(-ARENA_SIDED, ARENA_SIDEQ,yaw)\n\telse dist = getLocationYaw(-ARENA_SIDEQ-20.0,-ARENA_SIDED,yaw)\n\n} else if(x >= 0.0 && y > 0.0) {\t//--- ne\n\tif(y < ARENA_SIDEQ) getLocationYaw(ARENA_SIDED,ARENA_SIDED,yaw)\n\telse dist = getLocationYaw(-ARENA_SIDED,ARENA_SIDEQ+20.0,yaw)\n\n} else if(x >= 0.0 && y <= 0.0) { \t//--- se\n\tif(x < ARENA_SIDEQ) dist = getLocationYaw(ARENA_SIDED,-ARENA_SIDEQ,yaw)\n\telse dist = getLocationYaw(ARENA_SIDEQ+20.0,ARENA_SIDED,yaw)\n}\nscanned = 1\n"));
		actions.add(new Action(40, "STOP", "stand()"));
		actions.add(new Action(41, "TURN body TO back", "rotate(getDirection()-PI)\n//while(isRotating()) wait(0.05)\n"));
		actions.add(new Action(42, "TURN body TO back FROM SCANNED", "if(scanned == 1) {\n\trotate(getDirection()+getTorsoYaw()+getHeadYaw()+yaw-PI)\n\trotateHead(0.0)\n\trotateTorso(0.0)\n\twhile(isRotating() || isHeadRotating() || isTorsoRotating()) wait(0.05)\n}\n"));
		actions.add(new Action(43, "TURN body TO front", "//while(isRotating()) wait(0.05)\n"));
		actions.add(new Action(44, "TURN body TO front FROM SCANNED", "if(scanned == 1) {\n\trotateHead(0.0)\n\trotateTorso(0.0) \n\trotate(getDirection()+getTorsoYaw()+getHeadYaw()+yaw)\n\t//while(isRotating() || isHeadRotating() || isTorsoRotating()) wait(0.05)\n}\n"));
		actions.add(new Action(45, "TURN body TO left", "rotate(getDirection()+PIQ)\n//while(isRotating()) wait(0.05)\n"));
		actions.add(new Action(46, "TURN body TO left FROM SCANNED", "if(scanned == 1) {\n\trotateTorso(-PIQ)\n\trotateHead(-PIQ)\n\trotate(getDirection()+getTorsoYaw()+getHeadYaw()+yaw+PIQ)\n\t//while(isRotating() || isHeadRotating() || isTorsoRotating()) wait(0.05)\n}\n"));
		actions.add(new Action(47, "TURN body TO random", "if(random(1000) < 500) {\n\trotate(getDirection()+PIQ)\n} else {\n\trotate(getDirection()-PIQ)\n}\n//while(isRotating()) wait(0.05)\n"));
		actions.add(new Action(48, "TURN body TO random FROM SCANNED", "if(scanned == 1) {\n\tif(random(1000) < 500) {\n\t\trotate(getDirection()+getTorsoYaw()+getHeadYaw()+yaw+PIS)\n\t\trotateTorso(getHeadYaw()+yaw-PIS)\n\t\trotateHead(0.0)\n\t} else {\n\t\trotate(getDirection()+getTorsoYaw()+getHeadYaw()+yaw-PIS)\n\t\trotateTorso(getHeadYaw()+yaw+PIS)\n\t\trotateHead(0.0)\n\t}\n\t//while(isRotating() || isHeadRotating() || isTorsoRotating()) wait(0.05)\n}\n"));
		actions.add(new Action(49, "TURN body TO right", "rotate(getDirection()-PIQ)\n//while(isRotating()) wait(0.05)\n"));
		actions.add(new Action(40, "TURN body TO right FROM SCANNED", "if(scanned == 1) {\n\trotateTorso(PIQ) \n\trotateHead(PIQ) \n\trotate(getDirection()+getTorsoYaw()+getHeadYaw()+yaw-PIQ)\n\t//while(isRotating() || isHeadRotating() || isTorsoRotating()) wait(0.05)\n}\n"));
		actions.add(new Action(51, "TURN gun TO front", "rotateTorso(0.0)\n//while(isTorsoRotating()) wait(0.05)\n"));
		actions.add(new Action(52, "TURN gun TO front FROM SCANNED", "if(scanned == 1) {\n\trotateTorso(getHeadYaw()+yaw)\n\twhile(isTorsoRotating()) wait(0.05)\n}\n"));
		actions.add(new Action(53, "TURN gun TO left", "rotateTorso(PIT)\n//while(isTorsoRotating()) wait(0.05)\n"));
		actions.add(new Action(54, "TURN gun TO random", "if(random(1000) < 500) rotateTorso(PIT)\nelse rotateTorso(-PIT)\n//while(isTorsoRotating()) wait(0.05)\n"));
		actions.add(new Action(55, "TURN gun TO right", "rotateTorso(-PIT)\n//while(isTorsoRotating()) wait(0.05)\n"));
		actions.add(new Action(56, "TURN head TO front", "rotateHead(0.0)\n//while(isHeadRotating()) wait(0.05)\n"));
		actions.add(new Action(57, "TURN head TO left", "rotateHead(PIT)\n//while(isHeadRotating()) wait(0.05)\n"));
		actions.add(new Action(58, "TURN head TO random", "if(random(1000) < 500) rotateHead(PIT)\nelse rotateHead(-PIT)\n//while(isHeadRotating()) wait(0.05)\n"));
		actions.add(new Action(59, "TURN head TO right", "rotateHead(-PIT)\n//while(isHeadRotating()) wait(0.05)\n"));
		actions.add(new Action(60, "WAIT 0.5 SECONDS", "wait(0.5)\n"));
		actions.add(new Action(61, "WAIT 1 SECONDS", "wait(1)\n"));
		actions.add(new Action(62, "WAIT 1.5 SECONDS", "wait(1.5)\n"));
		actions.add(new Action(63, "WAIT 2 SECONDS", "wait(2)\n"));
		actions.add(new Action(64, "WAIT 2.5 SECONDS", "wait(2.5)\n"));
		actions.add(new Action(65, "WAIT ROTATE", "while(isRotating() || isHeadRotating() || isTorsoRotating()) wait(0.05)\n"));
		actions.add(new Action(66, "WAIT ROTATE WITH AUTO FIRE", "while(isRotating() || isHeadRotating() || isTorsoRotating()) {\n\titem = ENEMY_WARRIOR\n\tdist = aim(item)\n\tif(item == ENEMY_WARRIOR) {\n\t\twhile(!shootBullet()) wait(0.05)\n\t}\n}\n"));
		actions.add(new Action(67, "WHEN bot 0 DO STRATEGY 0", "if(getID() == 0) {\n\tSTRATEGY = 0\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(68, "WHEN bot 0 DO STRATEGY 1", "if(getID() == 0) {\n\tSTRATEGY = 1\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(69, "WHEN bot 1 DO STRATEGY 0", "if(getID() == 1) {\n\tSTRATEGY = 0\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(70, "WHEN bot 1 DO STRATEGY 1", "if(getID() == 1) {\n\tSTRATEGY = 1\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(71, "WHEN bot 2 DO STRATEGY 0", "if(getID() == 2) {\n\tSTRATEGY = 0\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(72, "WHEN bot 2 DO STRATEGY 1", "if(getID() == 2) {\n\tSTRATEGY = 1\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(73, "WHEN bot 3 DO STRATEGY 0", "if(getID() == 3) {\n\tSTRATEGY = 0\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(74, "WHEN bot 3 DO STRATEGY 1", "if(getID() == 3) {\n\tSTRATEGY = 1\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(75, "WHEN bot 4 DO STRATEGY 0", "if(getID() == 4) {\n\tSTRATEGY = 0\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(76, "WHEN bot 4 DO STRATEGY 1", "if(getID() == 4) {\n\tSTRATEGY = 1\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(77, "WHEN bot 5 DO STRATEGY 0", "if(getID() == 5) {\n\tSTRATEGY = 0\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(78, "WHEN bot 5 DO STRATEGY 1", "if(getID() == 5) {\n\tSTRATEGY = 1\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(79, "WHEN bot 6 DO STRATEGY 0", "if(getID() == 6) {\n\tSTRATEGY = 0\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(80, "WHEN bot 6 DO STRATEGY 1", "if(getID() == 6) {\n\tSTRATEGY = 1\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(81, "WHEN bot 7 DO STRATEGY 0", "if(getID() == 7) {\n\tSTRATEGY = 0\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(82, "WHEN bot 7 DO STRATEGY 1", "if(getID() == 7) {\n\tSTRATEGY = 1\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(83, "WHEN bot 8 DO STRATEGY 0", "if(getID() == 8) {\n\tSTRATEGY = 0\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(84, "WHEN bot 8 DO STRATEGY 1", "if(getID() == 8) {\n\tSTRATEGY = 1\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(85, "WHEN bot 9 DO STRATEGY 0", "if(getID() == 9) {\n\tSTRATEGY = 0\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(86, "WHEN bot 9 DO STRATEGY 1", "if(getID() == 9) {\n\tSTRATEGY = 1\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(87, "WHEN bot 10 DO STRATEGY 0", "if(getID() == 10) {\n\tSTRATEGY = 0\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(88, "WHEN bot 10 DO STRATEGY 1", "if(getID() == 10) {\n\tSTRATEGY = 1\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(89, "WHEN bot 11 DO STRATEGY 0", "if(getID() == 11) {\n\tSTRATEGY = 0\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(90, "WHEN bot 11 DO STRATEGY 1", "if(getID() == 11) {\n\tSTRATEGY = 1\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(91, "WHEN bot 12 DO STRATEGY 0", "if(getID() == 12) {\n\tSTRATEGY = 0\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(92, "WHEN bot 12 DO STRATEGY 1", "if(getID() == 12) {\n\tSTRATEGY = 1\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(93, "WHEN bot 13 DO STRATEGY 0", "if(getID() == 13) {\n\tSTRATEGY = 0\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(94, "WHEN bot 13 DO STRATEGY 1", "if(getID() == 13) {\n\tSTRATEGY = 1\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(95, "WHEN bot 14 DO STRATEGY 0", "if(getID() == 14) {\n\tSTRATEGY = 0\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(96, "WHEN bot 14 DO STRATEGY 1", "if(getID() == 14) {\n\tSTRATEGY = 1\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(97, "WHEN bot 15 DO STRATEGY 0", "if(getID() == 15) {\n\tSTRATEGY = 0\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(98, "WHEN bot 15 DO STRATEGY 1", "if(getID() == 15) {\n\tSTRATEGY = 1\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(99,  "WHEN bot 0 DO TACTIC 0", "if(getID() == 0) {\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(100, "WHEN bot 0 DO TACTIC 1", "if(getID() == 0) {\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(101, "WHEN bot 0 DO TACTIC 2", "if(getID() == 0) {\n\tTACTIC = 2\n\tbreak\n}\n"));
		actions.add(new Action(102, "WHEN bot 1 DO TACTIC 0", "if(getID() == 1) {\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(103, "WHEN bot 1 DO TACTIC 1", "if(getID() == 1) {\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(104, "WHEN bot 1 DO TACTIC 2", "if(getID() == 1) {\n\tTACTIC = 2\n\tbreak\n}\n"));
		actions.add(new Action(105, "WHEN bot 2 DO TACTIC 0", "if(getID() == 2) {\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(106, "WHEN bot 2 DO TACTIC 1", "if(getID() == 2) {\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(107, "WHEN bot 2 DO TACTIC 2", "if(getID() == 2) {\n\tTACTIC = 2\n\tbreak\n}\n"));
		actions.add(new Action(108, "WHEN bot 3 DO TACTIC 0", "if(getID() == 3) {\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(109, "WHEN bot 3 DO TACTIC 1", "if(getID() == 3) {\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(110, "WHEN bot 3 DO TACTIC 2", "if(getID() == 3) {\n\tTACTIC = 2\n\tbreak\n}\n"));
		actions.add(new Action(111, "WHEN bot 4 DO TACTIC 0", "if(getID() == 4) {\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(112, "WHEN bot 4 DO TACTIC 1", "if(getID() == 4) {\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(113, "WHEN bot 4 DO TACTIC 2", "if(getID() == 4) {\n\tTACTIC = 2\n\tbreak\n}\n"));
		actions.add(new Action(114, "WHEN bot 5 DO TACTIC 0", "if(getID() == 5) {\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(115, "WHEN bot 5 DO TACTIC 1", "if(getID() == 5) {\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(116, "WHEN bot 5 DO TACTIC 2", "if(getID() == 5) {\n\tTACTIC = 2\n\tbreak\n}\n"));
		actions.add(new Action(117, "WHEN bot 6 DO TACTIC 0", "if(getID() == 6) {\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(118, "WHEN bot 6 DO TACTIC 1", "if(getID() == 6) {\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(119, "WHEN bot 6 DO TACTIC 2", "if(getID() == 6) {\n\tTACTIC = 2\n\tbreak\n}\n"));
		actions.add(new Action(120, "WHEN bot 7 DO TACTIC 0", "if(getID() == 7) {\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(121, "WHEN bot 7 DO TACTIC 1", "if(getID() == 7) {\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(122, "WHEN bot 7 DO TACTIC 2", "if(getID() == 7) {\n\tTACTIC = 2\n\tbreak\n}\n"));
		actions.add(new Action(123, "WHEN bot 8 DO TACTIC 0", "if(getID() == 8) {\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(124, "WHEN bot 8 DO TACTIC 1", "if(getID() == 8) {\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(125, "WHEN bot 8 DO TACTIC 2", "if(getID() == 8) {\n\tTACTIC = 2\n\tbreak\n}\n"));
		actions.add(new Action(126, "WHEN bot 9 DO TACTIC 0", "if(getID() == 9) {\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(127, "WHEN bot 9 DO TACTIC 1", "if(getID() == 9) {\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(128, "WHEN bot 9 DO TACTIC 2", "if(getID() == 9) {\n\tTACTIC = 2\n\tbreak\n}\n"));
		actions.add(new Action(129, "WHEN bot 10 DO TACTIC 0", "if(getID() == 10) {\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(130, "WHEN bot 10 DO TACTIC 1", "if(getID() == 10) {\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(131, "WHEN bot 10 DO TACTIC 2", "if(getID() == 10) {\n\tTACTIC = 2\n\tbreak\n}\n"));
		actions.add(new Action(132, "WHEN bot 11 DO TACTIC 0", "if(getID() == 11) {\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(133, "WHEN bot 11 DO TACTIC 1", "if(getID() == 11) {\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(134, "WHEN bot 11 DO TACTIC 2", "if(getID() == 11) {\n\tTACTIC = 2\n\tbreak\n}\n"));
		actions.add(new Action(135, "WHEN bot 12 DO TACTIC 0", "if(getID() == 12) {\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(136, "WHEN bot 12 DO TACTIC 1", "if(getID() == 12) {\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(137, "WHEN bot 12 DO TACTIC 2", "if(getID() == 12) {\n\tTACTIC = 2\n\tbreak\n}\n"));
		actions.add(new Action(138, "WHEN bot 13 DO TACTIC 0", "if(getID() == 13) {\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(139, "WHEN bot 13 DO TACTIC 1", "if(getID() == 13) {\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(140, "WHEN bot 13 DO TACTIC 2", "if(getID() == 13) {\n\tTACTIC = 2\n\tbreak\n}\n"));
		actions.add(new Action(141, "WHEN bot 14 DO TACTIC 0", "if(getID() == 14) {\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(142, "WHEN bot 14 DO TACTIC 1", "if(getID() == 14) {\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(143, "WHEN bot 14 DO TACTIC 2", "if(getID() == 14) {\n\tTACTIC = 2\n\tbreak\n}\n"));
		actions.add(new Action(144, "WHEN bot 15 DO TACTIC 0", "if(getID() == 15) {\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(145, "WHEN bot 15 DO TACTIC 1", "if(getID() == 15) {\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(146, "WHEN bot 15 DO TACTIC 2", "if(getID() == 15) {\n\tTACTIC = 2\n\tbreak\n}\n"));
		actions.add(new Action(147, "WHEN bot enemy DO AUTO FIRE", "item = ENEMY_WARRIOR\ndist = aim(item)\nif(item == ENEMY_WARRIOR) {\n\twhile(!shootBullet()) wait(0.05)\n}\n"));
		actions.add(new Action(148, "WHEN bot is near DO TACTIC 0", "item = FRIEND_WARRIOR\ndist = aim(item)\nif(item == FRIEND_WARRIOR) {\n\tif(dist < 2.0) {\n\t\tTACTIC = 0\n\t\tbreak\n\t}\n}\n"));
		actions.add(new Action(149, "WHEN bot is near DO TACTIC 1", "item = FRIEND_WARRIOR\ndist = aim(item)\nif(item == FRIEND_WARRIOR) {\n\tif(dist < 2.0) {\n\t\tTACTIC = 1\n\t\tbreak\n\t}\n}\n"));
		actions.add(new Action(150, "WHEN bot is near DO TACTIC 2", "item = FRIEND_WARRIOR\ndist = aim(item)\nif(item == FRIEND_WARRIOR) {\n\tif(dist < 2.0) {\n\t\tTACTIC = 2\n\t\tbreak\n\t}\n}\n"));
		actions.add(new Action(151, "WHEN bot is near DO WAIT", "item = FRIEND_WARRIOR\ndist = aim(item)\nwhile(item == FRIEND_WARRIOR && dist < 4.0) {\n\tstand()\n\twait(1.0)\n\tdist = aim(item)\n}\n"));
		actions.add(new Action(152, "WHEN bot touched DO AUTO DESVIATE", "touched = getTouched()\nif(touched) {\n\tif(touched == FRIEND_WARRIOR || touched == ENEMY_WARRIOR) {\n\t\trotateHead(0.0)\n\t\trotateTorso(0.0)\n\t\twhile(isHeadRotating() || isTorsoRotating()) wait(0.05)\n\t\tdist = 0.0\n\t\titem = FRIEND_WARRIOR\n\t\twatch(item, dist, yaw, pitch)\n\t\tif(item == FRIEND_WARRIOR && dist < 4.0) {\n\t\t\tif(yaw >= -PID && yaw <= PID) {\n\t\t\t\tif(! isStanding()) { \n\t\t\t\t\tstand() \n\t\t\t\t\twait(0.1)\n\t\t\t\t}\n\t\t\t\tif(yaw < 0.0) rotate(getDirection()-PIQ)\n\t\t\t\telse rotate(getDirection()+PIQ)\n\t\t\t\twalkbk()\n\t\t\t\twait(1.0)\n\t\t\t\tstand()\n\t\t\t} else {\n\t\t\t\twalk()\n\t\t\t\twait(0.1)\n\t\t\t}\n\t\t} else {\n\t\t\twalk()\n\t\t\twait(0.1)\n\t\t}\n\t\ttouched = getTouched()\n\t\twhile(touched == FRIEND_WARRIOR || touched == ENEMY_WARRIOR) {\n\t\t\tif(random(1000) > 700) rotate(getDirection()+PID)\n\t\t\telse rotate(getDirection()-PID)\n\t\t\twhile(isRotating()) wait(0.05)\n\t\t\twalk()\n\t\t\twait(0.1)\n\t\t\ttouched = getTouched()\n\t\t}\n\t}\n}\n"));
		actions.add(new Action(153, "WHEN bot touched DO TACTIC 0", "touched = getTouched()\nif(touched) {\n\tif(touched == FRIEND_WARRIOR || touched == ENEMY_WARRIOR) {\n\t\tTACTIC = 0\n\t\tbreak\n\t}\n}\n"));
		actions.add(new Action(154, "WHEN bot touched DO TACTIC 1", "touched = getTouched()\nif(touched) {\n\tif(touched == FRIEND_WARRIOR || touched == ENEMY_WARRIOR) {\n\t\tTACTIC = 1\n\t\tbreak\n\t}\n}\n"));
		actions.add(new Action(155, "WHEN bot touched DO TACTIC 2", "touched = getTouched()\nif(touched) {\n\tif(touched == FRIEND_WARRIOR || touched == ENEMY_WARRIOR) {\n\t\tTACTIC = 2\n\t\tbreak\n\t}\n}\n"));
		actions.add(new Action(156, "WHEN item touched DO TACTIC 0", "touched = getTouched()\nif(touched) {\n\tif(touched != FRIEND_WARRIOR && touched != ENEMY_WARRIOR) {\n\t\tTACTIC = 0\n\t\tbreak\n\t}\n}\n"));
		actions.add(new Action(157, "WHEN item touched DO TACTIC 1", "touched = getTouched()\nif(touched) {\n\tif(touched != FRIEND_WARRIOR && touched != ENEMY_WARRIOR) {\n\t\tTACTIC = 1\n\t\tbreak\n\t}\n}\n"));
		actions.add(new Action(158, "WHEN item touched DO TACTIC 2", "touched = getTouched()\nif(touched) {\n\tif(touched != FRIEND_WARRIOR && touched != ENEMY_WARRIOR) {\n\t\tTACTIC = 2\n\t\tbreak\n\t}\n}\n"));
		actions.add(new Action(159, "WHEN item touched TAKE IT", "touched = getTouched()\nif(touched) {\n\tif(touched != FRIEND_WARRIOR && touched != ENEMY_WARRIOR) {\n\t\traise(touched)\n\t\twait(0.5)\n\t}\n}\n"));
		actions.add(new Action(160, "WHEN low armor DO AUTO RECOVER", "if(getArmor() <= 10) {\n\titem = ITEM_ARMOR\n\tdist = 0.0\n\twatch(item,dist,yaw,pitch)\n\twhile(item == ITEM_ARMOR) {\n\t\trotate(getDirection()+getTorsoYaw()+getHeadYaw()+yaw)\n\t\trotateHead(0.0)\n\t\trotateTorso(0.0)\n\t\twhile(isRotating() || isHeadRotating() || isTorsoRotating()) wait(1.0)\n\t\tif(isWalkingbk()) stand()\n\t\tif(isStanding()) walk()\n\t\tif(!isRunning()) run()\n\t\ttouched = getTouched()\n\t\tif(touched) raise(touched)\n\t\tdist = 0.0\n\t\twatch(item,dist,yaw,pitch)\n\t}\n}\n"));
		actions.add(new Action(161, "WHEN low armor DO TACTIC 0", "if(getArmor() <= 10) {\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(162, "WHEN low armor DO TACTIC 1", "if(getArmor() <= 10) {\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(163, "WHEN low armor DO TACTIC 2", "if(getArmor() <= 10) {\n\tTACTIC = 2\n\tbreak\n}\n"));
		actions.add(new Action(164, "WHEN low bullet DO AUTO RECOVER", "if(getBulletLoad() < 5) {\n\titem = ITEM_BULLET\n\tdist = 0.0\n\twatch(item,dist,yaw,pitch)\n\twhile(item == ITEM_BULLET) {\n\t\trotate(getDirection()+getTorsoYaw()+getHeadYaw()+yaw)\n\t\trotateHead(0.0)\n\t\trotateTorso(0.0)\n\t\twhile(isRotating() || isHeadRotating() || isTorsoRotating()) wait(0.05)\n\t\tif(isWalkingbk()) stand()\n\t\tif(isStanding()) walk()\n\t\tif(!isRunning()) run()\n\t\ttouched = getTouched()\n\t\tif(touched) raise(touched)\n\t\twatch(item,dist,yaw,pitch)\n\t}\n}\n"));
		actions.add(new Action(165, "WHEN low bullet DO TACTIC 0", "if(getBulletLoad() < 5) {\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(166, "WHEN low bullet DO TACTIC 1", "if(getBulletLoad() < 5) {\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(167, "WHEN low bullet DO TACTIC 2", "if(getBulletLoad() < 5) {\n\tTACTIC = 2\n\tbreak\n}\n"));
		actions.add(new Action(168, "WHEN low energy DO AUTO RECOVER", "if(getEnergy() < 10) {\n\titem = ITEM_FOOD\n\tdist = 0.0\n\twatch(item,dist,yaw,pitch)\n\twhile(item == ITEM_FOOD) {\n\t\tif(isWalkingbk()) stand()\n\t\trotate(getDirection()+getTorsoYaw()+getHeadYaw()+yaw)\n\t\trotateHead(0.0)\n\t\trotateTorso(0.0)\n\t\twhile(isRotating() || isHeadRotating() || isTorsoRotating()) wait(0.05)\n\t\tif(isStanding()) walk()\n\t\tif(!isRunning()) run()\n\t\ttouched = getTouched()\n\t\tif(touched) raise(touched)\n\t\tdist = 0.0\n\t\twatch(item,dist,yaw,pitch)\n\t}\n\twhile(getEnergy() < 20) {\n\t\titem = ENEMY_GUN\n\t\tdist = hear(item,sound,yaw)\n\t\tif((item == ENEMY_GUN) && (dist < 100.0)) break\n\t\tif(! isStanding()) stand()\n\t\twait(1.0)\n\t}\n\twalk()\n}\n"));
		actions.add(new Action(169, "WHEN low energy DO TACTIC 0", "if(getEnergy() < 10) {\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(170, "WHEN low energy DO TACTIC 1", "if(getEnergy() < 10) {\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(171, "WHEN low energy DO TACTIC 2", "if(getEnergy() < 10) {\n\tTACTIC = 2\n\tbreak\n}\n"));
		actions.add(new Action(172, "WHEN low grenade DO AUTO RECOVER", "if(getGrenadeLoad() == 0) {\n\titem = ITEM_GRENADE\n\tdist = 0.0\n\twatch(item,dist,yaw,pitch)\n\twhile(item == ITEM_GRENADE) {\n\t\trotate(getDirection()+getTorsoYaw()+getHeadYaw()+yaw)\n\t\trotateHead(0.0)\n\t\trotateTorso(0.0)\n\t\twhile(isRotating() || isHeadRotating() || isTorsoRotating()) wait(0.05)\n\t\tif(isWalkingbk()) stand()\n\t\tif(isStanding()) walk()\n\t\tif(!isRunning()) run()\n\t\ttouched = getTouched()\n\t\tif(touched) raise(touched)\n\t\twatch(item,dist,yaw,pitch)\n\t}\n}\n"));
		actions.add(new Action(173, "WHEN low grenade DO TACTIC 0", "if(getGrenadeLoad() == 0) {\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(174, "WHEN low grenade DO TACTIC 1", "if(getGrenadeLoad() == 0) {\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(175, "WHEN low grenade DO TACTIC 2", "if(getGrenadeLoad() == 0) {\n\tTACTIC = 2\n\tbreak\n}\n"));
		actions.add(new Action(176, "WHEN low health DO AUTO RECOVER", "if(getHealth() <= 50) {\n\titem = ITEM_MEDIKIT\n\tdist = 0.0\n\twatch(item,dist,yaw,pitch)\n\twhile(item == ITEM_MEDIKIT) {\n\t\trotate(getDirection()+getTorsoYaw()+getHeadYaw()+yaw)\n\t\trotateHead(0.0)\n\t\trotateTorso(0.0)\n\t\twhile(isRotating() || isHeadRotating() || isTorsoRotating()) wait(0.05)\n\t\tif(isWalkingbk()) stand()\n\t\tif(isStanding()) walk()\n\t\tif(!isRunning()) run()\n\t\ttouched = getTouched()\n\t\tif(touched) raise(touched)\n\t\twatch(item,dist,yaw,pitch)\n\t}\n}\n"));
		actions.add(new Action(177, "WHEN low health DO TACTIC 0", "if(getHealth() <= 50) {\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(178, "WHEN low health DO TACTIC 1", "if(getHealth() <= 50) {\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(179, "WHEN low health DO TACTIC 2", "if(getHealth() <= 50) {\n\tTACTIC = 2\n\tbreak\n}\n"));
		actions.add(new Action(180, "WHEN scanned at 1 meters DO AUTO DESVIATE", "if(scanned == 1) {\n\tif( dist <= 1 ) {\n\t\tstand()\n\t\tyaw += getHeadYaw()\n\t\tif(yaw >= -PIT && yaw <= PIT) {\n\t\t\tif(isStanding()) {\n\t\t\t\twalkbk()\n\t\t\t\twait(1.0)\n\t\t\t\tstand()\n\t\t\t} else {\n\t\t\t\tif(yaw < 0.0) rotate(getDirection()+PIQ)\n\t\t\t\telse rotate(getDirection()-PIQ)\n\t\t\t\twhile(isRotating()) wait(0.05)\n\t\t\t}\n\t\t}\n\t}\n}\n"));
		actions.add(new Action(181, "WHEN scanned at 2 meters DO AUTO DESVIATE", "if(scanned == 1) {\n\tif( dist <= 2 ) {\n\t\tstand()\n\t\tyaw += getHeadYaw()\n\t\tif(yaw >= -PIT && yaw <= PIT) {\n\t\t\tif(isStanding()) {\n\t\t\t\twalkbk()\n\t\t\t\twait(1.0)\n\t\t\t\tstand()\n\t\t\t} else {\n\t\t\t\tif(yaw < 0.0) rotate(getDirection()+PIQ)\n\t\t\t\telse rotate(getDirection()-PIQ)\n\t\t\t\twhile(isRotating()) wait(0.05)\n\t\t\t}\n\t\t}\n\t}\n}\n"));
		actions.add(new Action(182, "WHEN scanned at 3 meters DO AUTO DESVIATE", "if(scanned == 1) {\n\tif( dist <= 3 ) {\n\t\tstand()\n\t\tyaw += getHeadYaw()\n\t\tif(yaw >= -PIT && yaw <= PIT) {\n\t\t\tif(isStanding()) {\n\t\t\t\twalkbk()\n\t\t\t\twait(1.0)\n\t\t\t\tstand()\n\t\t\t} else {\n\t\t\t\tif(yaw < 0.0) rotate(getDirection()+PIQ)\n\t\t\t\telse rotate(getDirection()-PIQ)\n\t\t\t\twhile(isRotating()) wait(0.05)\n\t\t\t}\n\t\t}\n\t}\n}\n"));
		actions.add(new Action(183, "WHEN scanned at 4 meters DO AUTO DESVIATE", "if(scanned == 1) {\n\tif( dist <= 4 ) {\n\t\tstand()\n\t\tyaw += getHeadYaw()\n\t\tif(yaw >= -PIT && yaw <= PIT) {\n\t\t\tif(isStanding()) {\n\t\t\t\twalkbk()\n\t\t\t\twait(1.0)\n\t\t\t\tstand()\n\t\t\t} else {\n\t\t\t\tif(yaw < 0.0) rotate(getDirection()+PIQ)\n\t\t\t\telse rotate(getDirection()-PIQ)\n\t\t\t\twhile(isRotating()) wait(0.05)\n\t\t\t}\n\t\t}\n\t}\n}\n"));
		actions.add(new Action(184, "WHEN scanned at 5 meters DO AUTO DESVIATE", "if(scanned == 1) {\n\tif( dist <= 5 ) {\n\t\tstand()\n\t\tyaw += getHeadYaw()\n\t\tif(yaw >= -PIT && yaw <= PIT) {\n\t\t\tif(isStanding()) {\n\t\t\t\twalkbk()\n\t\t\t\twait(1.0)\n\t\t\t\tstand()\n\t\t\t} else {\n\t\t\t\tif(yaw < 0.0) rotate(getDirection()+PIQ)\n\t\t\t\telse rotate(getDirection()-PIQ)\n\t\t\t\twhile(isRotating()) wait(0.05)\n\t\t\t}\n\t\t}\n\t}\n}\n"));
		actions.add(new Action(185, "WHEN scanned at 1 meters DO TACTIC 0", "if(scanned == 1) {\n\tif( dist <= 1 ) {\n\t\tTACTIC = 0\n\t\tbreak\n\t}\n}\n"));
		actions.add(new Action(186, "WHEN scanned at 2 meters DO TACTIC 0", "if(scanned == 1) {\n\tif( dist <= 2 ) {\n\t\tTACTIC = 0\n\t\tbreak\n\t}\n}\n"));
		actions.add(new Action(187, "WHEN scanned at 3 meters DO TACTIC 0", "if(scanned == 1) {\n\tif( dist <= 3 ) {\n\t\tTACTIC = 0\n\t\tbreak\n\t}\n}\n"));
		actions.add(new Action(188, "WHEN scanned at 4 meters DO TACTIC 0", "if(scanned == 1) {\n\tif( dist <= 4 ) {\n\t\tTACTIC = 0\n\t\tbreak\n\t}\n}\n"));
		actions.add(new Action(189, "WHEN scanned at 5 meters DO TACTIC 0", "if(scanned == 1) {\n\tif( dist <= 5 ) {\n\t\tTACTIC = 0\n\t\tbreak\n\t}\n}\n"));
		actions.add(new Action(190, "WHEN scanned at 1 meters DO TACTIC 1", "if(scanned == 1) {\n\tif( dist <= 1 ) {\n\t\tTACTIC = 1\n\t\tbreak\n\t}\n}\n"));
		actions.add(new Action(191, "WHEN scanned at 2 meters DO TACTIC 1", "if(scanned == 1) {\n\tif( dist <= 2 ) {\n\t\tTACTIC = 1\n\t\tbreak\n\t}\n}\n"));
		actions.add(new Action(192, "WHEN scanned at 3 meters DO TACTIC 1", "if(scanned == 1) {\n\tif( dist <= 3 ) {\n\t\tTACTIC = 1\n\t\tbreak\n\t}\n}\n"));
		actions.add(new Action(193, "WHEN scanned at 4 meters DO TACTIC 1", "if(scanned == 1) {\n\tif( dist <= 4 ) {\n\t\tTACTIC = 1\n\t\tbreak\n\t}\n}\n"));
		actions.add(new Action(194, "WHEN scanned at 5 meters DO TACTIC 1", "if(scanned == 1) {\n\tif( dist <= 5 ) {\n\t\tTACTIC = 1\n\t\tbreak\n\t}\n}\n"));
		actions.add(new Action(195, "WHEN scanned at 1 meters DO TACTIC 2", "if(scanned == 1) {\n\tif( dist <= 1 ) {\n\t\tTACTIC = 2\n\t\tbreak\n\t}\n}\n"));
		actions.add(new Action(196, "WHEN scanned at 2 meters DO TACTIC 2", "if(scanned == 1) {\n\tif( dist <= 2 ) {\n\t\tTACTIC = 2\n\t\tbreak\n\t}\n}\n"));
		actions.add(new Action(197, "WHEN scanned at 3 meters DO TACTIC 2", "if(scanned == 1) {\n\tif( dist <= 3 ) {\n\t\tTACTIC = 2\n\t\tbreak\n\t}\n}\n"));
		actions.add(new Action(198, "WHEN scanned at 4 meters DO TACTIC 2", "if(scanned == 1) {\n\tif( dist <= 4 ) {\n\t\tTACTIC = 2\n\t\tbreak\n\t}\n}\n"));
		actions.add(new Action(199, "WHEN scanned at 5 meters DO TACTIC 2", "if(scanned == 1) {\n\tif( dist <= 5 ) {\n\t\tTACTIC = 2\n\t\tbreak\n\t}\n}\n"));
		actions.add(new Action(200, "WHEN scanned DO STRATEGY 0", "if(scanned == 1) {\n\tSTRATEGY = 0\n\tTACTIC = 0\n\tbreak\n}"));
		actions.add(new Action(201, "WHEN scanned DO STRATEGY 1", "if(scanned == 1) {\n\tSTRATEGY = 1\n\tTACTIC = 0\n\tbreak\n}"));
		actions.add(new Action(202, "WHEN scanned DO TACTIC 0", "if(scanned == 1) {\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(203, "WHEN scanned DO TACTIC 1", "if(scanned == 1) {\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(204, "WHEN scanned DO TACTIC 2", "if(scanned == 1) {\n\tTACTIC = 2\n\tbreak\n}\n"));
//		actions.add(new Action(205, "WHEN started DO AUTO ARRANGE", "if(started == 1) {\n\n\tstarted = 0\n\n\t//--- search for arena sides\n\n\tgetLocation(x, y)\n\tif(x <= 0.0 && y < 0.0) {\t\t//--- sw\n\t\tif((-x) < (-y)) dist = getLocationYaw(ARENA_SIDED, -ARENA_SIDEQ,yaw)\n\t\telse dist = getLocationYaw(-ARENA_SIDEQ,ARENA_SIDED,yaw)\n\n\t} else if(x < 0.0 && y >= 0.0) { \t//--- nw\n\t\tif((-x) < y) dist = getLocationYaw(ARENA_SIDED, ARENA_SIDEQ,yaw)\n\t\telse dist = getLocationYaw(-ARENA_SIDEQ,-ARENA_SIDED,yaw)\n\n\t} else if(x >= 0.0 && y > 0.0) {\t//--- ne\n\t\tif(x < y) dist = getLocationYaw(-ARENA_SIDED,ARENA_SIDEQ,yaw)\n\t\telse dist = getLocationYaw(ARENA_SIDEQ,-ARENA_SIDED,yaw)\n\n\t} else if(x >= 0.0 && y <= 0.0) { \t//--- se\n\t\tif(x < (-y)) dist = getLocationYaw(-ARENA_SIDED,-ARENA_SIDEQ,yaw)\n\t\telse dist = getLocationYaw(ARENA_SIDEQ,ARENA_SIDED,yaw)\n\t}\n\trotate(getDirection()+getTorsoYaw()+getHeadYaw()+yaw)\n\twhile(isRotating()) wait(0.05)\n\n\t//--- search for far wall\n\n\tdist = sight()\n\twhile(dist <= ARENA_SIDEQ) {\n\t\trotate(getDirection()+PIS)\n\t\twhile(isRotating()) wait(0.05)\n\t\tdist = sight()\n\t}\n}\n"));
		actions.add(new Action(205, "WHEN started DO AUTO ARRANGE", "// do nothing"));
		actions.add(new Action(206, "WHEN started DO STRATEGY 0", "if(started == 1) {\n\tstarted = 0\n\tSTRATEGY = 0\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(207, "WHEN started DO STRATEGY 1", "if(started == 1) {\n\tstarted = 0\n\tSTRATEGY = 1\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(208, "WHEN started DO TACTIC 0", "if(started == 1) {\n\tstarted = 0\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(209, "WHEN started DO TACTIC 1", "if(started == 1) {\n\tstarted = 0\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(210, "WHEN started DO TACTIC 2", "if(started == 1) {\n\tstarted = 0\n\tTACTIC = 2\n\tbreak\n}\n"));
		actions.add(new Action(211, "WHEN stopped DO TACTIC 0", "if( isStanding() ) {\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(212, "WHEN stopped DO TACTIC 1", "if( isStanding() ) {\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(213, "WHEN stopped DO TACTIC 2", "if( isStanding() ) {\n\tTACTIC = 2\n\tbreak\n}\n"));
		actions.add(new Action(214, "WHEN time left 50 second DO AUTO CHANGE DIRECTION", "if((getTime()-lasttime) > 50) {\n\tlasttime = getTime()\n\tif(random(1000) < 500) {\n\t\trotate(getDirection()+PIQ)\n\t} else {\n\t\trotate(getDirection()-PIQ)\n\t}\n\t//while(isRotating()) wait(0.05)\n}\n"));
		actions.add(new Action(215, "WHEN time left 40 second DO AUTO CHANGE DIRECTION", "if((getTime()-lasttime) > 40) {\n\tlasttime = getTime()\n\tif(random(1000) < 500) {\n\t\trotate(getDirection()+PIQ)\n\t} else {\n\t\trotate(getDirection()-PIQ)\n\t}\n\t//while(isRotating()) wait(0.05)\n}\n"));
		actions.add(new Action(216, "WHEN time left 30 second DO AUTO CHANGE DIRECTION", "if((getTime()-lasttime) > 30) {\n\tlasttime = getTime()\n\tif(random(1000) < 500) {\n\t\trotate(getDirection()+PIQ)\n\t} else {\n\t\trotate(getDirection()-PIQ)\n\t}\n\t//while(isRotating()) wait(0.05)\n}\n"));
		actions.add(new Action(217, "WHEN time left 20 second DO AUTO CHANGE DIRECTION", "if((getTime()-lasttime) > 20) {\n\tlasttime = getTime()\n\tif(random(1000) < 500) {\n\t\trotate(getDirection()+PIQ)\n\t} else {\n\t\trotate(getDirection()-PIQ)\n\t}\n\t//while(isRotating()) wait(0.05)\n}\n"));
		actions.add(new Action(218, "WHEN time left 10 second DO AUTO CHANGE DIRECTION", "if((getTime()-lasttime) > 10) {\n\tlasttime = getTime()\n\tif(random(1000) < 500) {\n\t\trotate(getDirection()+PIQ)\n\t} else {\n\t\trotate(getDirection()-PIQ)\n\t}\n\t//while(isRotating()) wait(0.05)\n}\n"));
		actions.add(new Action(219, "WHEN time left 5 second DO AUTO CHANGE DIRECTION", "if((getTime()-lasttime) > 5) {\n\tlasttime = getTime()\n\tif(random(1000) < 500) {\n\t\trotate(getDirection()+PIQ)\n\t} else {\n\t\trotate(getDirection()-PIQ)\n\t}\n\t//while(isRotating()) wait(0.05)\n}\n"));
		actions.add(new Action(220, "WHEN time left 20 second DO TACTIC 0", "if((getTime()-lasttime) > 20) {\n\tlasttime = getTime()\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(221, "WHEN time left 20 second DO TACTIC 1", "if((getTime()-lasttime) > 20) {\n\tlasttime = getTime()\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(222, "WHEN time left 20 second DO TACTIC 2", "if((getTime()-lasttime) > 20) {\n\tlasttime = getTime()\n\tTACTIC = 2\n\tbreak\n}\n"));
		actions.add(new Action(223, "WHEN time left 10 second DO TACTIC 0", "if((getTime()-lasttime) > 10) {\n\tlasttime = getTime()\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(224, "WHEN time left 10 second DO TACTIC 1", "if((getTime()-lasttime) > 10) {\n\tlasttime = getTime()\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(225, "WHEN time left 10 second DO TACTIC 2", "if((getTime()-lasttime) > 10) {\n\tlasttime = getTime()\n\tTACTIC = 2\n\tbreak\n}\n"));
		actions.add(new Action(226, "WHEN time left 5 second DO TACTIC 0", "if((getTime()-lasttime) > 5) {\n\tlasttime = getTime()\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(227, "WHEN time left 5 second DO TACTIC 1", "if((getTime()-lasttime) > 5) {\n\tlasttime = getTime()\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(228, "WHEN time left 5 second DO TACTIC 2", "if((getTime()-lasttime) > 5) {\n\tlasttime = getTime()\n\tTACTIC = 2\n\tbreak\n}\n"));
		actions.add(new Action(229, "WHEN wall DO AUTO DESVIATE", "dist = sight()\nif( dist <= 2.0 || dist >= 200.0) {\n\tif(isRunning()) {\n\t\twalk()\n\t\tdist = sight()\n\t}\n\trotateHead(getHeadYaw()-PIQ)\n\twhile(isHeadRotating()) wait(0.05)\n\tif(sight() > dist) {\n\t\trotate(getDirection()-(PIQ*2))\n\t} else {\n\t\trotate(getDirection()+(PIQ*2))\n\t}\n\trotateHead(getHeadYaw()+PIQ)\n\twhile(isRotating() || isHeadRotating()) wait(0.05)\n}\n"));
		actions.add(new Action(230, "WHEN wall DO TACTIC 0", "if( sight() < 2.0 ) {\n\tTACTIC = 0\n\tbreak\n}\n"));
		actions.add(new Action(231, "WHEN wall DO TACTIC 1", "if( sight() < 2.0 ) {\n\tTACTIC = 1\n\tbreak\n}\n"));
		actions.add(new Action(232, "WHEN wall DO TACTIC 2", "if( sight() < 2.0 ) {\n\tTACTIC = 2\n\tbreak\n}\n"));

		return actions;
	}

	public Action GetAction(int id) {
		for (int i = 0; i < get_actions().size() - 1; i++)
			if (get_actions().get(i).get_id() == id)
				return get_actions().get(i);
		return get_actions().get(0);
	}
}
